package com.aaron.demos.security;

import org.apache.commons.codec.binary.Hex;

import java.security.SecureRandom;

public class SaltGenerator {

    public static SecureRandom random = new SecureRandom();

    static String genSalt() {
        byte[] bytes = new byte[10];
        random.nextBytes(bytes);
        char[] chars = Hex.encodeHex(bytes);
        return new String(chars);
    }

    public static void main(String[] args) {

    }
}
